package com.zh.common.dao;


import com.zh.common.domain.UserRoleDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;
import java.util.Map;

/**
 * 用户与角色对应关系
 * @author lds
 * @email 1992lcg@163.com
 * @date 2019-05-23 14:44:17
 */
@Mapper
public interface UserRoleDao {

	UserRoleDO get(String id);
	
	List<UserRoleDO> list(Map<String, Object> map);
	
	int count(Map<String, Object> map);
	
	int save(UserRoleDO userRole);
	
	int update(UserRoleDO userRole);
	
	int remove(String id);
	
	int batchRemove(String[] ids);

	List<String> listRoleId(String userId);

	int removeByUserId(String userId);

	int batchSave(List<UserRoleDO> list);

	int batchRemoveByUserId(String[] ids);

	int batchRemoveByRoleId(String[] ids);

	int removeByRoleId(String roleId);
}
